package com.kdfly.zmdfsj.model;

import com.kdfly.zmdfsj.MarketEvent;
import com.kdfly.zmdfsj.R;

import java.util.Random;

/**
 * Created by Sean on 2015-09-08.
 */
public class Constants {
    public static final String[] location = {"北京", "上海", "广州", "深圳", "青岛", "杭州", "天津", "纽约", "驻马店"};

    public static final String[] goods = {"防雾霾口罩","特斯拉","游戏点卡","飞天茅台","《大人的书》","传奇霸业","大米手机","大宝"};
    public static final String[] goodID = {"g1","g2","g3","g4","g5","g6","g7","g8"};
    public static final int goodsPriceBase[] = new int[]{500,50000,100,5000,2500,1250,3750,200};
    public static final int goodsPriceRand[] = new int[]{1750,75000,500,12500,3500,3000,3750,1000};
    public static int randomGoodsAmount = 3;
    public static int GOOD_TYPE_COUNT = 8;

    protected static Random random = new Random();
    public static int getRandom(int max) {
        return random.nextInt(max);
    }

    public static final int FIXED_DEBT_PERCENTAGE = 10;

    public static final int INIT_CASH = 5000;
    public static final int INIT_BANK_CASH = 0;
    public static final int INIT_DEPOSIT = 0;
    public static final int INIT_DEBT = 5500;
    public static final int INIT_SPACE = 100;

    public static boolean INIT_SHOW_PRICE_WAVE = false;

    //interface update events
    public static final int UPDATE_GAME_OVER = 0;
    public static final int UPDATE_DAY = 1;
    public static final int UPDATE_HEALTH = 2;
    public static final int UPDATE_FAME = 3;
    public static final int UPDATE_MONEY = 4;
    public static final int UPDATE_MARKET = 5;
    public static final int UPDATE_ROOM = 6;
    public static final int UPDATE_PLACE = 7;
    public static final int UPDATE_DEAL = 8;
    public static final int UPDATE_SETTINGS = 9;

    //GM mode interface update events
    public static final int GOTO_DAY_30 = 101;
    public static final int START_NEW_GAME = 102;


//    protected int frequency;   // the frequency of the events
//    protected int messageId;  // what message to display when event happen
//    protected int goodId;  // goods ID to be influenced
//    protected int multiplier;  // price increased ( *)
//    protected int divisor; //price decrease   ( /)
//    protected int addCount;   // how many goods to give user (+)
//    protected int addDebt;	//only for the mobile phone
//    public static final MarketEvent EVENTS_MARKET[] = new MarketEvent[] {
//        new MarketEvent(1, R.string.notify_market_5, 7, 4, 0, 0),
//        new MarketEvent(1, R.string.notify_market_7, 7, 7, 0, 0),
//        new MarketEvent(1, R.string.notify_market_11, 0, 0, 8, 0),
//        new MarketEvent(1, R.string.notify_market_12, 5, 0, 5, 0),
//        new MarketEvent(1, R.string.notify_market_13, 2, 0, 8, 0),
//        new MarketEvent(2, R.string.notify_market_3, 2, 4, 0, 0),
//        new MarketEvent(2, R.string.notify_market_4, 1, 3, 0, 0),
//        new MarketEvent(2, R.string.notify_market_6, 4, 8, 0, 0),
//        new MarketEvent(2, R.string.notify_market_8, 3, 7, 0, 0),
//        new MarketEvent(2, R.string.notify_market_9, 6, 7, 0, 0),
//        new MarketEvent(2, R.string.notify_market_10, 1, 8, 0, 0),
//        new MarketEvent(2, R.string.notify_market_15, 0, 0, 0, 6),
//        new MarketEvent(2, R.string.notify_market_16, 3, 0, 0, 4),
//        new MarketEvent(3, R.string.notify_market_2, 4, 5, 0, 0),
//        new MarketEvent(4, R.string.notify_market_1, 3, 3, 0, 0),
//        new MarketEvent(4, R.string.notify_market_17, 6, 0, 0, 1, 2500),
//        new MarketEvent(5, R.string.notify_market_14, 1, 0, 0, 2),
//        new MarketEvent(5, R.string.notify_market_0, 5, 2, 0, 0)};

//    {"0进口香烟","1走私汽车","2盗版VCD","3五粮液","4《小时代》","5进口玩具","6水货手机","7雅思兰黛"}
    public static final MarketEvent EVENTS_MARKET_One[] = new MarketEvent[] {
            new MarketEvent(1, R.string.notify_market_5, 7, 4, 0, 0),
            new MarketEvent(1, R.string.notify_market_7, 7, 7, 0, 0),
            new MarketEvent(1, R.string.notify_market_11, 0, 0, 8, 0),
            new MarketEvent(1, R.string.notify_market_12, 5, 0, 5, 0),
            new MarketEvent(1, R.string.notify_market_13, 2, 0, 8, 0)};

    public static final MarketEvent EVENTS_MARKET_Two[] = new MarketEvent[] {
            new MarketEvent(2, R.string.notify_market_3, 2, 4, 0, 0),
            new MarketEvent(2, R.string.notify_market_4, 1, 3, 0, 0),
            new MarketEvent(2, R.string.notify_market_6, 4, 8, 0, 0),
            new MarketEvent(2, R.string.notify_market_8, 3, 7, 0, 0),
            new MarketEvent(2, R.string.notify_market_9, 6, 7, 0, 0),
            new MarketEvent(2, R.string.notify_market_10, 1, 8, 0, 0),
            new MarketEvent(2, R.string.notify_market_15, 0, 0, 0, 6),
            new MarketEvent(2, R.string.notify_market_16, 3, 0, 0, 4)};

    public static final MarketEvent EVENTS_MARKET_Three[] = new MarketEvent[] {
            new MarketEvent(3, R.string.notify_market_2, 4, 5, 0, 0)};

    public static final MarketEvent EVENTS_MARKET_Four[] = new MarketEvent[] {
            new MarketEvent(4, R.string.notify_market_1, 3, 3, 0, 0),
        new MarketEvent(4, R.string.notify_market_17, 6, 0, 0, 1, 2500)};

    public static final MarketEvent EVENTS_MARKET_Five[] = new MarketEvent[] {
            new MarketEvent(5, R.string.notify_market_14, 1, 0, 0, 2),
            new MarketEvent(5, R.string.notify_market_0, 5, 2, 0, 0)};

    public static final MarketEvent EVENTS_MARKET_Six[] = new MarketEvent[] {
            new MarketEvent(6, R.string.hello_world, 8, 0, 0, 0)};
}
